#include <stdio.h>
#include <stdlib.h>
double mypower(double base, int exp) {
  double result = base;
  int i;
  if (exp == 0) {
    return 1;
  }

  for (i = 1; i < exp; i++) {
    result = result * base;
  }
  return result;
}
int main(int argc, char *argv[]) {
  if (argc < 3) {
    printf("Usage: %s base exp \n", argv[0]);
    return 1;
  }
  double base = atof(argv[1]);
  int exp = atoi(argv[2]);
  double result = mypower(base, exp);
  printf("%g ^ %d is %g\n", base, exp, result);
  return 0;
}